package com.pzj.dormitory.util;

import com.pzj.dormitory.vo.ResultVO;

public class ResultVOUtil {

    /**
     * 成功
     * @param data
     * @return
     */
    public static ResultVO success(Object data){
        ResultVO resultVO = new ResultVO();
        resultVO.setData(data);
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }

    /**
     * 失败
     * @param
     * @return
     */
    public static ResultVO fail(){
        ResultVO resultVo = new ResultVO();
        resultVo.setCode(-1);
        return resultVo ;
    }
}
